package cn.itcast.day03.接口作为方法的参数和返回值;


/*
  接口作为方法的参数和返回值;

    传递和返回的都是实现类对象
 */
public class Test {
    public static void main(String[] args) {
        Mouse mouse = new Mouse();
        method01(mouse);

        USB usb = method02();
        usb.open();

      /*  method01(()-> System.out.println("开启"));*/
    }

    public static void method01(USB usb){
        usb.open();
    }

    public static USB method02(){
        Mouse mouse = new Mouse();
        return mouse;
    }
}
